Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: handle report options on fatalerror #32497

Closed
wants to merge 1 commit into from

Conversation

sam-github
Copy link
Contributor

@sam-github sam-github commented Mar 26, 2020

Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • testcases added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Mar 26, 2020
@sam-github
Copy link
Contributor Author

Running C++ linter...
File "src/node_report.cc" does not use "PerIsolateOptions"

Which is kindof the point... I'll look into suppressing that.

And it seems the markdown linter has dozens of complaints about the collaborator and cpp style guides.

@gireeshpunathil
Copy link
Member

@sam-github - do you have a test case / story from users that reproduce the issue you are solving here?

@richardlau
Copy link
Member

Running C++ linter...
File "src/node_report.cc" does not use "PerIsolateOptions"

Which is kindof the point... I'll look into suppressing that.

Getting rid of the using statement should suffice:
https://github.com/nodejs/node/blob/cca1bae91ffc0cf9739cb4ea336eaa524f8bfba6/src/node_report.cc#L35

And it seems the markdown linter has dozens of complaints about the collaborator and cpp style guides.

Where are you seeing those?

@sam-github
Copy link
Contributor Author

@gireeshpunathil Its the same case as previous, the previous fix was to make it posible to check the value of --report-on-fatalerror. Now that is checked, and the value of report-on-fatalerror is respected. But actually triggering the report requires access to 3 other cli report values (filename, dirname, compact). Those aren't reachable under the same conditions that report-on-fatalerror did not used to be reachable.

I'll extend the tests to show this.

@sam-github
Copy link
Contributor Author

@gireeshpunathil I expanded the test suite, run with a version of node predating this and you can see what used to fail.

@nodejs-github-bot
Copy link
Collaborator

@sam-github
Copy link
Contributor Author

@nodejs/diagnostics PTAL

@nodejs-github-bot
Copy link
Collaborator

@sam-github
Copy link
Contributor Author

Recurring failure is unrelated: #32510

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @cjihrig pointed out in #32535 (review), this is missing guards to protect against race conditions.

Follow on to nodejs#32207, 3 other options
are also not respected under situations that the isolate is not
available.
@sam-github sam-github requested a review from addaleax March 30, 2020 19:24
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@sam-github
Copy link
Contributor Author

@addaleax I have implemented the locking, PTAL

sam-github added a commit that referenced this pull request Mar 31, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.

PR-URL: #32497
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@sam-github
Copy link
Contributor Author

@addaleax thank you.

Landed in 867ff41

@sam-github sam-github closed this Mar 31, 2020
@sam-github sam-github deleted the fix-report-options branch March 31, 2020 19:00
MylesBorins pushed a commit that referenced this pull request Mar 31, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.

PR-URL: #32497
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
Follow on to nodejs#32207, 3 other options
are also not respected under situations that the isolate is not
available.

PR-URL: nodejs#32497
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
targos pushed a commit that referenced this pull request Apr 28, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.

PR-URL: #32497
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants